#pragma once
#include "TimeDisplay.h"

class CLeftTimeDisplay :public CTimeDisplay
{
	DECLARE_DYNAMIC(CLeftTimeDisplay)

public:
	CLeftTimeDisplay();
	~CLeftTimeDisplay() override;

protected:
	DECLARE_MESSAGE_MAP()
public:
	void setLeftTime(intptr_t leftSeconds/*0.1s*/);
protected:
	intptr_t lfSec;
	intptr_t m_state;		//-1(N/A) 0(0.0-9.9) 1(10.0-59.9) 2(1:00-9:59) 3(10m-99m)
	stNumBitmap nmTimeGreen[13];	//0-9 . : m
	stNumBitmap nmTimeRed[11];		//0-9 .
	stNumBitmap nmTimeYellow[11];	//0-9 .
	stNumBitmap nmMsRed[10], nmMsYellow[10];
	HBITMAP hBitmapNA;
	CRect numRect[4], numRect0[3], numRect1[4], numRect2[4], numRect3[3], numRectNA;
	intptr_t numIndex[4];

	void drawOutGreen(intptr_t id, intptr_t n);
	void drawOutRed(intptr_t id, intptr_t n);
	void drawOutYellow(intptr_t id, intptr_t n);
	void drawMsRed(intptr_t n);
	void drawMsYellow(intptr_t n);
};
